Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU: Fix compile errors with newer Dawn versions after WGPUProgrammableStageDescriptor rename #8369

Closed

Conversation

PhantomCloak
Copy link
Contributor

Dawn renamed WGPUProgrammableStageDescriptor type to WGPUComputeState (webgpu-native/webgpu-headers#413) which breaks the current Dawn backend when building against newer versions. WGPU hasn't renamed it yet, so adding type alias as temporary fix until both backends adopt the same naming.

Compile errors encountered with newer versions of Dawn.

/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:266:8: error: unknown type name 'WGPUProgrammableStageDescriptor'
static WGPUProgrammableStageDescriptor ImGui_ImplWGPU_CreateShaderModule(const char* wgsl_source)
       ^
/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:283:5: error: unknown type name 'WGPUProgrammableStageDescriptor'
    WGPUProgrammableStageDescriptor stage_desc = {};
    ^
/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:668:5: error: unknown type name 'WGPUProgrammableStageDescriptor'
    WGPUProgrammableStageDescriptor vertex_shader_desc = ImGui_ImplWGPU_CreateShaderModule(__shader_vert_wgsl);
    ^
/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:690:5: error: unknown type name 'WGPUProgrammableStageDescriptor'
    WGPUProgrammableStageDescriptor pixel_shader_desc = ImGui_ImplWGPU_CreateShaderModule(__shader_frag_wgsl);
    ^
4 errors generated.

ocornut pushed a commit that referenced this pull request Feb 3, 2025
@ocornut
Copy link
Owner

ocornut commented Feb 3, 2025

Merged as da0ba9e, thank you!

@ocornut ocornut closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants